////////////////////////////////////////
// StringTable.h
// Name:  Stephen Durfey
// Class: CS335
// Time:  Tue, Thurs 1:00-2:15pm
// Professor: Dr. Michael Poor

#ifndef _STRING_TABLE_H
#define _STRING_TABLE_H

#include <iostream>
#include <fstream>
#include <vector>
#include "stringUtil.h"

const string sep = "#";
using namespace std;

////////////////////////////////////////

class StringTable
{
public:
    ////////////////////////////////////////
    // 'StringTable' constructor
    // reads in a 2D table of multiword strings
    //     from file 'infile'
    // each multiword is separated by "#";
    // each row is separated by an extra "#";
    // yet another extra "#" at the end of rows 
    // Example (2 rows, 3 columns):
    // Los Angeles # California # USA # #
    // New York City # New York # USA # #
    // #

    StringTable(ifstream & infile, string &fullWord);

    ////////////////////////////////////////
    // 'rows' returns the number of rows

    int rows() const;

    ////////////////////////////////////////
    // operator [] returns row at index 'i';
    // accessor (not a mutator);
    // returns a reference but not mutable;
    // TODO: write prototype, be careful about
    //     value vs. reference vs. constant reference

    vector<string> &operator[](int index);
    

private:
    vector < vector<string> > vectMatrix;

   
};

#endif

